#pragma once
#include "afxwin.h"

struct ControlPoint
{
	ControlPoint():m_x(0),m_y(0),m_z(0){}
	double m_x,m_y,m_z;
};
// CBezierEditor dialog

class CBezierEditor : public CDialog
{
	DECLARE_DYNCREATE(CBezierEditor)

public:
	CBezierEditor(CWnd* pParent = NULL,int degree=2);   // standard constructor
	virtual ~CBezierEditor();

// Dialog Data
	enum { IDD = IDD_BEZIER_EDITOR};

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();
	
	DECLARE_MESSAGE_MAP()
public:
	double m_x;
	double m_y;
	double m_z;
	ControlPoint m_ctlPt[4];
	afx_msg void OnBnClickedOk();
	afx_msg void OnBnClickedCancel();
	afx_msg void OnBnClickedEditPoint();
	afx_msg void OnCbnEditchangeCtlptId();
	afx_msg void OnCbnSelchangeCtlptId();
	void SetCtlPoint(int ptid, double x, double y, double z);
	bool GetCtlPoint(int ptid, double &x, double &y, double &z);
	

protected:
	CComboBox m_ctlPtIdSelctor;
	CString m_ctlPtId;
	int m_degree;	

};
